def length(function):
    def wrapper(arg):
        print "Length = ", len(arg)
        return function(arg)
    return wrapper

@length
def openFile(filename):
        print "Filename = ", filename

openFile('test.txt')
openFile('test1.txt')